<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <title>{{.sysname}}</title>
    <link rel="stylesheet" href="/static/css/newmain.css"/>
    <link rel="stylesheet" href="/static/css/top.css"/>
</head>
{{template "top.html" .}}
<body class="camslist_body">
<div class="modal-headers">{{if eq .t "algo"}}算法{{else if eq .t "decode"}}解码{{end}}详情 {{.data.SkillId}}</div>

<div class="formout">
    <form method="post" name="algo_form" id="algo_form" action="/algoinfoconfig/add?t={{.t}}">
        <div class="tbarlist">

            <div class="box-search">
                <button type="button" class="form_btn"
                        onclick="self.location=document.referrer;">返回
                </button>
                {{if eq .alaction "add"}}
                    <input type="submit" name="submit" id="submit" class="form_btn">
                    </input>
                {{end}}
            </div>
        </div>

        <div class="form-body">
            {{str2html .configItems}}
        </div>

    </form>

</div>
</body>
<script src="/static/js/jquery-3.4.1.min.js"></script>

<script src="/static/js/jsbeautify.js"></script>
<script src="/static/js/common.js"></script>
<script>
    $(document).ready(function () {
        $('#submit').click(function () {
            $('#algo_form').submit(function (event) {
                console.log(event);
            });
        });
        //美化
        function do_js_beautify(s) {
            if (s == undefined) {
                s = ""
            }
            var js_source = s.replace(/^\s+/, '');
            if (js_source.length == 0)
                return;
            var tabsize = 4;
            tabchar = ' ';
            if (tabsize == 1)
                tabchar = '\t';
            return js_beautify(js_source, tabsize, tabchar);
        }
        let param = $("#algo_res").val()
        let fjs = do_js_beautify(param)
        $("#algo_res").val(fjs);
    })
</script>
</html>